/**
*      author: Y_Yao
*      created: 2024-10-23 09:46:53
**/
//树状数组
#include<bits/stdc++.h>

using namespace std;
#define int LL
using LL = long long;
const LL LLINF = 1e18;
const int INF = 0x3f3f3f3f;
const int N = 1e6 +7;
int arr[N];
int n;

inline int lowbit(int x)
{
    return x & (-x);
}
void add(int p,int x)
{
    while(p <= n)
    {
        arr[p] += x;
        p += lowbit(p);
    }
}
int query(int p)
{
    int ret = 0;
    while(p)
    {
        ret += arr[p];
        p -= lowbit(p);
    }
    return ret;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    while(cin >> n)
    {
        if(n == 0) break;
        memset(arr,0,sizeof arr);
        for(int i = 1;i <= n;i++)
        {
            int l,r;
            cin >> l >> r;
            add(l,1);
            add(r + 1,-1);
        }

        for(int i = 1;i <= n;i++)
        {
            int sum = 0;
            //sum = query(i);
            sum = arr[i];
            cout << sum << " ";
        }
        cout << endl;
    }
    return 0;
}